package production.practice.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@TableName("user")
@Data
public class User extends BaseEntity {
    public static final LambdaQueryWrapper<User> gw(){
        return new LambdaQueryWrapper<>();
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("user_name")
    private String username;
    @TableField("password")
    private String password;
    @TableField("name")
    private String name;
    @DateTimeFormat(pattern="yy-mm-dd HH:mm:ss")
    public LocalDateTime createTime;
}
